//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package objects;

public class Neighbor {
    private final int ID;
    private final int GoodGlobalId;
    private final int GoodAmount;
    private int idleCount = 0;

    public Neighbor(int id, int goodid, int goodamount) {
        this.ID = id;
        this.GoodGlobalId = goodid;
        this.GoodAmount = goodamount;
        this.idleCount = 3;
    }

    public int id() {
        return this.ID;
    }

    public int GoodGlobalId() {
        return this.GoodGlobalId;
    }

    public int GoodAmount() {
        return this.GoodAmount;
    }

    public int updateIdle() {
        --this.idleCount;
        if(this.idleCount <= 0) {
            this.idleCount = 0;
        }

        return this.idleCount;
    }
}
